#ifndef FILE_NODE_OSG
#define FILE_NODE_OSG
#include <DefinePluginOsg.h>
#include <QObject>
#include <osg/MatrixTransform>
#include <OsgClassDataSource/MatrixTransformOsg.h>
#include <QUrl>
#include <osg/CopyOp>


class DLL_EXPORT_PLUGIN_OSG FileNodeOsg : public MatrixTransformOsg
{
	Q_OBJECT
        Q_PROPERTY(QUrl Url READ getFileUrl WRITE setFileUrl)

public:
    FileNodeOsg(QObject *parent = 0);
    FileNodeOsg(QString str);
    virtual ~FileNodeOsg();

    QUrl getFileUrl();
    void setFileUrl(QUrl url);

    virtual void copyFrom(EObject* objPtr);
    virtual EObject* clone();

    virtual bool isTraverseChildEObject();//used when saving xml file,default = true;

protected:
    QString saveModeFileToProjectDir(const QString& fileName);

private:
    QUrl m_url;

    //QString m_filePath;
    //osg::ref_ptr<FileNode> m_fileNode;
};
#endif // FILE_NODE_OSG
